package com.xintonghua.hongyi.adapter;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

import com.xintonghua.base.BuildConfig;
import com.xintonghua.base.adapter.BaseAdapter;
import com.xintonghua.base.ui.ImageActivity;
import com.xintonghua.base.utils.MyUtils;
import com.xintonghua.hongyi.R;
import com.xintonghua.hongyi.bean.PriceBean;
import com.xintonghua.hongyi.ui.price.PriceDetailActivity;

import java.util.List;

/**
 * 作者：wanxianyi
 * 时间：2018/1/13.
 * 包名：com.xintonghua.hongyi.adapter
 */

public class PriceAdapter extends BaseAdapter<PriceBean, PriceAdapter.PriceViewHolder> {
    public PriceAdapter(Activity mActivity, List<PriceBean> list) {
        super(mActivity, list);
    }

    @Override
    public PriceViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = inflater.inflate(R.layout.adapter_price, parent, false);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                MyUtils.openActivity(mActivity, PriceDetailActivity.class);
            }
        });
        return new PriceViewHolder(view);
    }

    @Override
    public int getItemCount() {
        return 4;
    }

    @Override
    public void onBindViewHolder(PriceViewHolder holder, int position) {

    }

    class PriceViewHolder extends RecyclerView.ViewHolder {

        public PriceViewHolder(View itemView) {
            super(itemView);
        }
    }
}
